package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBannerMapper;
import com.ruoyi.system.domain.SysBanner;
import com.ruoyi.system.service.ISysBannerService;
import com.ruoyi.common.core.text.Convert;

/**
 * 首页幻灯Service业务层处理
 * 
 * @author mcrgood
 * @date 2024-08-23
 */
@Service
public class SysBannerServiceImpl implements ISysBannerService 
{
    @Autowired
    private SysBannerMapper sysBannerMapper;

    /**
     * 查询首页幻灯
     * 
     * @param id 首页幻灯主键
     * @return 首页幻灯
     */
    @Override
    public SysBanner selectSysBannerById(Long id)
    {
        return sysBannerMapper.selectSysBannerById(id);
    }

    /**
     * 查询首页幻灯列表
     * 
     * @param sysBanner 首页幻灯
     * @return 首页幻灯
     */
    @Override
    public List<SysBanner> selectSysBannerList(SysBanner sysBanner)
    {
        return sysBannerMapper.selectSysBannerList(sysBanner);
    }

    /**
     * 新增首页幻灯
     * 
     * @param sysBanner 首页幻灯
     * @return 结果
     */
    @Override
    public int insertSysBanner(SysBanner sysBanner)
    {
        return sysBannerMapper.insertSysBanner(sysBanner);
    }

    /**
     * 修改首页幻灯
     * 
     * @param sysBanner 首页幻灯
     * @return 结果
     */
    @Override
    public int updateSysBanner(SysBanner sysBanner)
    {
        return sysBannerMapper.updateSysBanner(sysBanner);
    }

    /**
     * 批量删除首页幻灯
     * 
     * @param ids 需要删除的首页幻灯主键
     * @return 结果
     */
    @Override
    public int deleteSysBannerByIds(String ids)
    {
        return sysBannerMapper.deleteSysBannerByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除首页幻灯信息
     * 
     * @param id 首页幻灯主键
     * @return 结果
     */
    @Override
    public int deleteSysBannerById(Long id)
    {
        return sysBannerMapper.deleteSysBannerById(id);
    }
}
